﻿using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;

namespace NotesVaultOnline
{
    public class BundleConfig
    {
        public const string PartialScriptPath = "~/Scripts/partial";
        public const string PageScriptPath = "~/Scripts/partial";

        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            //Bootstrap
            bundles.Add(new StyleBundle("~/Content/bootstrap").Include(
                "~/Content/bootstrap.css",
                "~/Content/bootstrap-responsive.css"));
            bundles.Add(new ScriptBundle("~/Scripts/bootstrap").Include(
                "~/Scripts/bootstrap.js",
                "~/Scripts/modernizr-{version}-respond-{version}.js",
                "~/Scripts/bootstrapx-clickover.js"));
            //jQuery
            bundles.Add(new ScriptBundle("~/Scripts/jquery").Include(
                "~/Scripts/jquery-{version}.js"));

            #region jQuery Plugins
            //All
            bundles.Add(new StyleBundle("~/Content/jquery-plugins").Include(
                "~/Content/toastr.css",
                "~/Content/toastr-responsive.css"));
            bundles.Add(new ScriptBundle("~/Scripts/jquery-plugins").Include(
                "~/Scripts/toastr.js",
                "~/Scripts/ajaxupload.js",
                "~/Scripts/jquery.upload-{version}.js"));

            //Validation
            bundles.Add(new ScriptBundle("~/Scripts/jquery-val").Include(
                "~/Scripts/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js"));
            #endregion

            //Other
            bundles.Add(new ScriptBundle("~/Scripts/knockout").Include(
                "~/Scripts/knockout-{version}.js"));

            //Custom
            bundles.Add(new StyleBundle("~/Content/main").Include("~/Content/Site.css"));
            bundles.Add(new ScriptBundle("~/Scripts/novo-main").Include("~/Scripts/Pages/Master.js"));
            bundles.Add(new ScriptBundle("~/Scripts/novo-data").IncludeDirectory("~/Scripts/Data", "*.js", true));
        }
    }
}